import axios from 'axios';

export function searchWorkProList (param) {
	return axios({
      method : 'get',
      url : '/problemReason/list',
      headers: {
        'Cache-Control': 'no-cache'
      },
      params: param
    })
}

export function editWorkPro (param) {
	return axios({
      method : 'post',
      url : '/problemReason/update',
      data: param,
      headers: {
        'Cache-Control': 'no-cache'
      }
    })
}

export function deleteWorkPro (param) {
  return axios({
      method : 'post',
      url : '/problemReason/delete',
      data: param,
      headers: {
        'Cache-Control': 'no-cache'
      }
    })
}

export function addWorkPro (param) {
  return axios({
      method : 'post',
      url : '/problemReason/insert',
      data: param,
      headers: {
        'Cache-Control': 'no-cache'
      }
    })
}

export function toggleStatus(param) {
  // let item = param.procedureVO;
  let url = param.enableStatus ? '/problemReason/disable' : '/problemReason/enable'
  return axios({
    method: 'post',
    url,
    data: param,
    headers: {
      'Cache-Control': 'no-cache'
    }
  })
}

export function referCheck (param) {
  return axios({
      method : 'get',
      url : '/problemReason/referCheck',
      headers: {
        'Cache-Control': 'no-cache'
      },
      params: param
    })
}